Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

224
Views
¿Componente Vue no reconocido? Configuración muy básica. El componente "encabezado" se ha registrado pero no se ha utilizado vue/no-unused-components

Estoy tratando de que se reconozca este componente de encabezado y simplemente no lo es. Intenté modificar la configuración de eslint en estricto y modificar mi sintaxis sin éxito. No lo entiendo, esto debería ser tan simple. Cualquier ayuda sería apreciada.

aplicación.vue

 <template> <div class="container"> <header /> </div> </template> <script> import header from './components/header' export default { name: 'App', components: { header, } } </script> <style> </style>

principal.js

 import { createApp } from 'vue' import App from './App.vue' createApp(App).mount('#app')

índice.html

 <!DOCTYPE html> <html lang=""> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width,initial-scale=1.0"> <link rel="icon" href="<%= BASE_URL %>favicon.ico"> <title><%= htmlWebpackPlugin.options.title %></title> </head> <body> <noscript> <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> </noscript> <div id="app"> </div> <!-- built files will be auto injected --> </body> </html>

encabezado.vue

 <template> <header> <h1>Component header</h1> </header> </template> <script> export default { name: 'header', }; </script> <style> header { display: flex; } </style>

Cualquier ayuda sería increíble. Gracias.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

El main.js debe importarse en index.html :

 <body> <div id="app"></div> <script type="module" src="/src/js/main.js"></script> </body>

(usando la ruta correcta)

Es mejor cambiar el nombre de su componente de encabezado a otra palabra, porque <header> se usa como un nombre de etiqueta estándar en html

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!